<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>后台管理 - 开心买</title>
<link type="text/css" rel="stylesheet" href="${project_name}/css/style.css" />
<style type="text/css">
	td img{width:60px;hight:60px;}
</style>
<script type="text/javascript" src="${project_name}/js/jquery-1.8.3.js"></script>
<script>$(function(){$('.clearfix li:eq(2)').addClass('current');});</script>
</head>
<link href="${project_name}/pagination/pagination.min.css" rel="stylesheet">
<script src="${project_name}/pagination/pagination.js"></script>
<script>
	onload=function () {
		new Pagination({
			element: '#paging', // 元素        
			type: 1, // 样式类型，可选[1,2]      
			pageIndex: '${pages.getPageNum()}', // 初始页码       
			pageSize: '${pages.getPageSize()}', // 每页数量       
			pageCount: '${pages.getPages()}', // 页码数量       
			total: '${pages.getTotal()}', // 数据总条数        
			jumper: true, // 显示输入框跳转        
			singlePageHide: false, // 只有一页时不显示分页       
			prevText: '上一页', // 上一页文字        
			nextText: '下一页', // 下一页文字       
			disabled: true, // 是否显示禁用        
			currentChange: function(index) {
				// 页码改变时回调         
				location='${project_name}/back_product/show/'+index
			}
		});
	}
</script>
<body>
<jsp:include page="public_header.jsp" />
<div id="main" class="wrap">
	<c:import url="public_menu.jsp"></c:import>
	<div class="main">
		<h2>商品管理</h2>
		<div class="manage">
			<table class="list">
				<tr>
					<th>ID</th>
					<th>商品名称</th>
					<th>操作</th>
				</tr>
					<c:forEach items="${productList}" var="pl">
					<tr>
						<td class="first w4 c">${pl.id}</td>
						<td class="thumb">
							<img src="${project_name}/image/${pl.image}" alt="木有图片" />
							<a href="${project_name}/product/search?id=${pl.id}" target="_blank">
								${pl.name}
							</a>
						</td>
						<td class="w1 c">
							<a href="manage/product-modify.jsp">修改</a>
							<a href="" onclick="return confirm('确定删除?')">删除</a>
						</td>
					</tr>
				</c:forEach>
			</table>
		</div>
		<div id="paging"></div>
	</div>
	<div class="clear"></div>
</div>
<div id="footer">
	Copyright &copy; 2010 极客营 All Rights Reserved. 京ICP证801001号
</div>
</body>
</html>
